home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / mac / DirectX SDK / DXSDK / samples / Multimedia / VBSamples / DirectPlay / Memory / readme.txt < prev    next >
Text File  |  2001-10-10  |  2KB  |  55 lines

  1. //-----------------------------------------------------------------------------
  2. // 
  3. // Sample Name: VB Memory Sample
  4. // 
  5. // Copyright (C) 1999-2001 Microsoft Corporation. All rights reserved.
  6. // 
  7. //-----------------------------------------------------------------------------
  8.  
  9.  
  10. Description
  11. ===========
  12.   Memory is a simple game in which you match 'tiles' and try to score the most 
  13.   points.
  14.   
  15. Path
  16. ====
  17.   Source: DXSDK\Samples\Multimedia\VBSamples\DirectPlay\Memory
  18.  
  19.   Executable: DXSDK\Samples\Multimedia\VBSamples\DirectPlay\Bin
  20.  
  21. User's Guide
  22. ============
  23.   Choose Multiplayer or Solitaire, and then just select images and try to 
  24.   get a match.  Score one point for every match.  In multiplayer mode try to
  25.   get more matches than your opponent(s).  In solitaire mode, try to clear the 
  26.   board in as few attempts as possible.
  27.  
  28. Programming Notes
  29. =================
  30.   The Memory sample is very similar in form to the SimplePeer sample.  For 
  31.   detailed programming notes on the basics this sample, refer to Programming 
  32.   Notes section of the SimplePeer sample.
  33.  
  34.   * An image is clicked.
  35.         1. If it's your turn, show the picture.
  36.         2. Fills out a byte array telling everyone else to show the picture.
  37.         3. Calls DirectPlay8Peer.SendTo with the byte array.  It passes 
  38.            DPNID_ALL_PLAYERS_GROUP so this message goes to everyone. 
  39.    
  40.  
  41.   * Handle DirectPlay system messages.  See implemented DirectPlay8Event interfaces
  42.  
  43.         The Chat sample handles the typical messages as described in the 
  44.         SimplePeer programming notes, and in addition:
  45.         
  46.         - Upon Receive event: 
  47.             *Checks the type of this message.
  48.             *Selects off of the message type.
  49.             *If MSG_SETUPBOARD, retreive board information and udpate local state.
  50.             *If MSG_SHOWPIECE, show the indicated piece.
  51.             *If MSG_HIDEPIECES, hide all pieces that aren't currently matched.
  52.             *If MSG_TURNEND, advance to the next players turn.
  53.             *If MSG_CHAT, receive a text string, and update the UI.
  54.             *If MSG_MATCHED, set the state so these two pictures are matched.
  55.